﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PloobsEngine.Commands;
using PloobsEngine.Publishers;
using PloobsEngine.Input;

namespace PloobsEngine.Features
{
    public class PickingRemove : ICommand
    {
        private IList<IObserver> obs = new List<IObserver>();
        private Picking picking;
        private MouseButtons mb;

        public IList<IObserver> Observers
        {
            get
            {
                return obs;
            }
        }

        public PickingRemove(MouseButtons mb)
        {
            this.mb = mb;
        }
        

        #region ICommand Members

        public void execute()
        {
            picking.RemoveObserver(obs,mb);
        }

        #endregion

        #region ICommand Members


        public string TargetName
        {
            get { return Picking.MyName; }
        }

        #endregion
    
        #region ICommand Members


        public void  setTarget(object obj)
        {
            this.picking = obj as Picking;
        }

        #endregion
    }
}
